package com.citycloud.ccuap.tc.admin.entity;

import com.citycloud.ccuap.framework.service.Model;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Version;
import org.springframework.data.mybatis.annotations.*;
import org.springframework.data.repository.query.parser.Part;

import java.util.Date;

import static org.springframework.data.mybatis.annotations.Id.GenerationType.ASSIGNATION;

/**
 * 项目（站点）默认菜单实体对象
 * @author zhusr
 *
 */
@Data
@NoArgsConstructor
@Entity(table = "sys_project_default_function")
public class SysProjectDefaultFunction implements Model {
	private static final long serialVersionUID = 1L;
	
	@Id(strategy = ASSIGNATION)
	@Column(name = "fun_id")
	@Condition(type = Part.Type.LIKE)
	private String funId;
	
	@Column(name = "fun_name")
	@Condition(type = Part.Type.LIKE)
	private String funName;
	
	@Column(name = "fun_type")
	@Condition
	private Short funType;
	
	@Column(name = "location")
	@Condition(type = Part.Type.LIKE)
	private String location;

	@Column(name = "help_url")
	@Condition
	private String helpUrl;

	@Column(name = "open_new")
	@Condition(type = Part.Type.LIKE)
	private Boolean openNew;
	
	@Column(name = "pid")
	@Condition(type = Part.Type.LIKE)
	private String pid;
	
	@Column(name = "order_no")
	@Condition
	private Long orderNo;
	
	@Column(name = "log_flag")
	@Condition
	private Short logFlag;
	
	@Column(name = "icon")
	@Condition(type = Part.Type.LIKE)
	private String icon;
	
	@Version
	@Column(name = "version")
	@Condition
	private Integer version;
	
	@Column(name = "remark")
	@Condition(type = Part.Type.LIKE)
	private String remark;
	
	@Column(name = "full_path")
	@Condition(type = Part.Type.LIKE)
	private String fullPath;
	
	@Column(name = "creator")
	@Condition(type = Part.Type.LIKE)
	private String creator;
	
	@Column(name = "created_time")
	@Conditions({ 
		@Condition,
		@Condition(type = Part.Type.GREATER_THAN_EQUAL, properties="startCreatedTime"), 
		@Condition(type = Part.Type.LESS_THAN, properties="endCreatedTime") 
	})
	private Date createdTime;
	
	@Column(name = "updator")
	@Condition(type = Part.Type.LIKE)
	private String updator;
	
	@Column(name = "updated_time")
	@Conditions({ 
		@Condition,
		@Condition(type = Part.Type.GREATER_THAN_EQUAL, properties="startUpdatedTime"), 
		@Condition(type = Part.Type.LESS_THAN, properties="endUpdatedTime") 
	})
	private Date updatedTime;
	


}